home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
tools
/
czesc_3
/
reminder
/
src
/
constants.h
< prev
next >
Wrap
C/C++ Source or Header
|
1993-04-19
|
3KB
|
95 lines
/* Constants for both Reminder and ReminderCheck */
/* $Id: Constants.h,v 1.15 1993/04/19 15:21:11 Matti_Rintala Exp $ */
#ifndef CONSTANTS_H
#define CONSTANTS_H
#include <time.h>
#include <exec/nodes.h>
/* Tooltype (or command line arg) which tells the database name */
#define FILETYPE "FILE"
/* Default filename for database */
#define DEFAULTFILE "S:Reminder.data"
/* Tooltype (or command line arg) which tells the minimum interval
(in hours) between two checks */
#define INTRVLTYPE "INTERVAL"
#define DEFAULTINTRVL 0
/* Tooltype (or command line arg) which tells not to use ReqTools.library */
#define NOREQTOOLSTYPE "NOREQTOOLS"
/* Tooltype (or command line arg) which tells not to use ARexx */
#define NOAREXXTYPE "NOAREXX"
/* Tooltype (or command line arg) which tells maximum number of events in one
grouped requester */
#define MAXGROUPTYPE "MAXGROUP"
#define DEFAULTMAXGROUP 4
/* Tooltype (or command line arg) which tells maximum width of line in
ReminderCheck requester */
#define MAXWIDTHTYPE "MAXWIDTH"
#define DEFAULTMAXWIDTH 30
/* Minimum and maximum years */
#define MINYEAR 1993
#define MAXYEAR 2099
/* Maximum number of days before which the reminding starts */
#define MAXBEFORE 365
/* Same for after event */
#define MAXAFTER MAXBEFORE
/* Maximum length of entered text */
#define TEXTLEN 90
/* Maximun length of one entry in Eventlist gadget */
#define ENTRYLEN 40
/* Length of arexxcom field */
#define AREXXCOMLEN 28
/* Length of arexxport field */
#define AREXXPORTLEN 10
/* EventNode structure, holding all events in the database */
struct EventNode {
struct Node node;
unsigned char mode; /* ARexx mode + 'D' if deleted */
char arexxcom[AREXXCOMLEN+1]; /* ARexx command */
char arexxport[AREXXPORTLEN+1]; /* ARexx port */
char text[TEXTLEN+1]; /* Text of the event */
short wday, day, month, year; /* Date of event */
short after, before; /* Reminding limits */
BOOL autodelete; /* autodeletion flag */
short aday, amonth, ayear; /* acknowledgement date */
time_t next_date; /* Next occurrence of event */
char entry[ENTRYLEN+1]; /* Text in the Eventlist gadget */
};
/* Address range of EventNode to be saved */
#define SAVEADDR(x) (&(x)->mode)
#define SAVELEN(x) ((char *)&(x)->next_date - (char *)&(x)->mode)
/* Character in mode, if entry is deleted */
#define DELETEDMODE 'D'
/* Character in mode, if ARexx is not used */
#define AREXXNMODE 0
/* Character in mode, if ARexx script name is in arexx field */
#define AREXXSMODE 1
/* Character in mode, if ARexx command + port is in arexx field */
#define AREXXCMODE 2
/* Bitmask used with mode field to indicate grouping */
#define GROUPEDMASK 0x80
#endif